package com.mashibing.juc.c_003;

/**
 * @author: Yuanzt
 * @Date: 2021/3/24
 */
public class T1 {

    private int count = 10;
    public synchronized void m(){//等同于在方法的代码执行时要synchronized(this)
        count--;
        System.out.println(Thread.currentThread().getName()+" count = "+count);
    }

    public void n(){
        count++;
    }

}
